package com.cari.oa.domain;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 
* Title: SysProjectUserRelEntity
* Description:  软件项目与用户的关联关系
* Company: cari 
* @author  hjx 
* @date    2013-1-17
 */
@Entity
@Table(name = "T_PROJECT_USER_REL")
public class SoftProjectUserRelEntity implements Serializable {

    private static final long serialVersionUID = -8044192006938075668L;

    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;

    @NotNull(message = "用户英文名不能为空")
    @Column(name = "person_enname")
    private String personEnname;

    @NotNull(message = "项目ID不能为空")
    @Length(max = 32, message = "项目ID长度要小于32个字符")
    @Column(name = "project_id")
    private String projectId;
    
    @Column(name = "type")
    private String type;
    
	public String getPersonEnname() {
		return personEnname;
	}

	public void setPersonEnname(String personEnname) {
		this.personEnname = personEnname;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
